require 'redcarpet'
require 'nokogiri'
module PostsHelper
    def md(content)
        renderer = Redcarpet::Render::HTML.new(no_links: false, hard_wrap: true)
        markdown = Redcarpet::Markdown.new(renderer, 
                                           fenced_code_blocks: true,
                                           autolink: true,
                                           tables: true)
        markdown.render(content).html_safe
    end
end
